using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyPoint1 : MonoBehaviour
{
    public static EnemyPoint1 Instance;
    // 敌人预设体
    public GameObject EnemyPre;
    private float timer = 0;
    // 控制计时器是否使用
    public bool isTimerActive = true;
    void Awake()
    {
        Instance = this;
    }

    void Update()
    {
        if(isTimerActive){
            timer += Time.deltaTime;
            if(timer > 3){
                timer = 0;
                Instantiate(EnemyPre,transform.position,transform.rotation);
            }
        }
    }
}
